<template>
	<view style="background-color: #f0f0f0;" class="vwh df-yc">
		<!-- 导航栏 -->
		<view class="navbar w100" :style="{ background: bgcolor }">
			<cu-custom :isBack="true" :showBackIcon="true">
				<block slot="backText">
					<text class="nav-title shopro-selector-rect">规则说明</text>
				</block>
			</cu-custom>
		</view>
		<!-- 内容 -->
		<view style="overflow: hidden;" class="content wh100">
			<scroll-view scroll-y="true">
				<view class="bs pa30">
					<view v-if="type=='score'">
						<score></score>
					</view>
					<view v-if="type=='checkname'">
						<name></name>
					</view>
					<view v-if="type=='rich'">
						<u-parse :html="richText"></u-parse>
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import score from "./components/score.vue"
	import name from "./components/name.vue"
	export default {
		components: {
			score,
			name
		},
		data() {
			return {
				bgcolor: "#f0f0f0",
				type: "",
				richText: ""
			};
		},
		onLoad(options) {
			this.type = this.$Route.query.type
			if (this.$Route.query.type == 'rich') {
				this.richText = decodeURIComponent(this.$Route.query.richText)
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>
